// 中国省市县数据
export const chinaRegions = {
  provinces: [
    { name: '北京市', code: '110000' },
    { name: '天津市', code: '120000' },
    { name: '河北省', code: '130000' },
    { name: '山西省', code: '140000' },
    { name: '内蒙古自治区', code: '150000' },
    { name: '辽宁省', code: '210000' },
    { name: '吉林省', code: '220000' },
    { name: '黑龙江省', code: '230000' },
    { name: '上海市', code: '310000' },
    { name: '江苏省', code: '320000' },
    { name: '浙江省', code: '330000' },
    { name: '安徽省', code: '340000' },
    { name: '福建省', code: '350000' },
    { name: '江西省', code: '360000' },
    { name: '山东省', code: '370000' },
    { name: '河南省', code: '410000' },
    { name: '湖北省', code: '420000' },
    { name: '湖南省', code: '430000' },
    { name: '广东省', code: '440000' },
    { name: '广西壮族自治区', code: '450000' },
    { name: '海南省', code: '460000' },
    { name: '重庆市', code: '500000' },
    { name: '四川省', code: '510000' },
    { name: '贵州省', code: '520000' },
    { name: '云南省', code: '530000' },
    { name: '西藏自治区', code: '540000' },
    { name: '陕西省', code: '610000' },
    { name: '甘肃省', code: '620000' },
    { name: '青海省', code: '630000' },
    { name: '宁夏回族自治区', code: '640000' },
    { name: '新疆维吾尔自治区', code: '650000' },
    { name: '台湾省', code: '710000' },
    { name: '香港特别行政区', code: '810000' },
    { name: '澳门特别行政区', code: '820000' }
  ],
  
  // 部分主要城市数据（这里只列出部分示例，实际项目中可以根据需要扩展）
  cities: {
    '北京市': [{ name: '北京市', code: '110100' }],
    '天津市': [{ name: '天津市', code: '120100' }],
    '河北省': [
      { name: '石家庄市', code: '130100' },
      { name: '唐山市', code: '130200' },
      { name: '秦皇岛市', code: '130300' },
      { name: '邯郸市', code: '130400' },
      { name: '邢台市', code: '130500' },
      { name: '保定市', code: '130600' }
    ],
    '山西省': [
      { name: '太原市', code: '140100' },
      { name: '大同市', code: '140200' },
      { name: '阳泉市', code: '140300' }
    ],
    '内蒙古自治区': [
      { name: '呼和浩特市', code: '150100' },
      { name: '包头市', code: '150200' },
      { name: '乌海市', code: '150300' },
      { name: '赤峰市', code: '150400' },
      { name: '通辽市', code: '150500' },
      { name: '鄂尔多斯市', code: '150600' }
    ],
    '安徽省': [
      { name: '合肥市', code: '340100' },
      { name: '芜湖市', code: '340200' },
      { name: '蚌埠市', code: '340300' },
      { name: '淮南市', code: '340400' },
      { name: '马鞍山市', code: '340500' },
      { name: '淮北市', code: '340600' },
      { name: '铜陵市', code: '340700' },
      { name: '安庆市', code: '340800' }
    ],
    '四川省': [
      { name: '成都市', code: '510100' },
      { name: '自贡市', code: '510300' },
      { name: '攀枝花市', code: '510400' },
      { name: '泸州市', code: '510500' },
      { name: '德阳市', code: '510600' },
      { name: '绵阳市', code: '510700' },
      { name: '广元市', code: '510800' },
      { name: '遂宁市', code: '510900' },
      { name: '内江市', code: '511000' },
      { name: '乐山市', code: '511100' },
      { name: '南充市', code: '511300' }
    ],
    '重庆市': [{ name: '重庆市', code: '500100' }],
    '广东省': [
      { name: '广州市', code: '440100' },
      { name: '深圳市', code: '440300' },
      { name: '珠海市', code: '440400' },
      { name: '汕头市', code: '440500' },
      { name: '佛山市', code: '440600' }
    ],
    '江苏省': [
      { name: '南京市', code: '320100' },
      { name: '无锡市', code: '320200' },
      { name: '徐州市', code: '320300' },
      { name: '常州市', code: '320400' },
      { name: '苏州市', code: '320500' }
    ],
    '浙江省': [
      { name: '杭州市', code: '330100' },
      { name: '宁波市', code: '330200' },
      { name: '温州市', code: '330300' },
      { name: '嘉兴市', code: '330400' }
    ]
  },
  
  // 部分主要区县数据（示例）
  districts: {
    '南充市': [
      { name: '顺庆区', code: '511302' },
      { name: '高坪区', code: '511303' },
      { name: '嘉陵区', code: '511304' },
      { name: '阆中市', code: '511381' },
      { name: '南部县', code: '511321' },
      { name: '营山县', code: '511322' },
      { name: '蓬安县', code: '511323' },
      { name: '仪陇县', code: '511324' },
      { name: '西充县', code: '511325' }
    ],
    '安庆市': [
      { name: '迎江区', code: '340802' },
      { name: '大观区', code: '340803' },
      { name: '宜秀区', code: '340811' },
      { name: '怀宁县', code: '340822' },
      { name: '潜山县', code: '340824' },
      { name: '太湖县', code: '340825' },
      { name: '宿松县', code: '340826' },
      { name: '望江县', code: '340827' },
      { name: '岳西县', code: '340828' }
    ],
    '鄂尔多斯市': [
      { name: '东胜区', code: '150602' },
      { name: '康巴什区', code: '150603' },
      { name: '达拉特旗', code: '150621' },
      { name: '准格尔旗', code: '150622' },
      { name: '鄂托克前旗', code: '150623' },
      { name: '鄂托克旗', code: '150624' },
      { name: '杭锦旗', code: '150625' },
      { name: '乌审旗', code: '150626' },
      { name: '伊金霍洛旗', code: '150627' }
    ],
    '成都市': [
      { name: '锦江区', code: '510104' },
      { name: '青羊区', code: '510105' },
      { name: '金牛区', code: '510106' },
      { name: '武侯区', code: '510107' },
      { name: '成华区', code: '510108' }
    ],
    '北京市': [
      { name: '东城区', code: '110101' },
      { name: '西城区', code: '110102' },
      { name: '朝阳区', code: '110105' },
      { name: '海淀区', code: '110108' }
    ]
  }
};

// 获取所有省份
export function getProvinces() {
  return chinaRegions.provinces.map(province => province.name);
}

// 根据省份获取城市
export function getCitiesByProvince(provinceName) {
  return chinaRegions.cities[provinceName] || [];
}

// 根据城市获取区县
export function getDistrictsByCity(cityName) {
  return chinaRegions.districts[cityName] || [];
}